import request from '@/utils/request';
import { AxiosPromise } from 'axios';

// 通过人员id获取回收站文件
export function  getRecycleBinFoxBaseSelect  (params: any): AxiosPromise<any>  {
  return request({
    url: '/system/api/recycleBin/foxBase/select',
    method: 'get',
    params,
  });
}

//  查询个人文档树
export const apiTreeFileSelectTree = (query?: any): AxiosPromise<any[]> => {
  return request({
    url: `/knowledge/api/personalTreeFile/selectPersonalTree`,
    method: 'get',
    params: query
  });
};

// 还原回收站文件
export function  restoreRecycleFile  (params: any): AxiosPromise<any>  {
  return request({
    url: '/system/api/recycleBin/foxBase/recoverFile/path',
    method: 'post',
    params,
  });
}

// 全部删除回收站文件
export function  deleteAllRecycleFile  (query: any): AxiosPromise<any>  {
  return request({
    url: '/system/api/recycleBin/foxBase/deleteAll',
    method: 'get',
    params: query
  });
}

// 查询还原的路径 
export function  apienterpriseFilesTreeQuery  (params: any): AxiosPromise<any>  {
  return request({
    url: '/knowledge/enterpriseFilesTree/query',
    method: 'get',
    params,
  });
}

// 还原文件
export function  apirecoverFilepath  (data: any): AxiosPromise<any>  {
  return request({
    url: '/system/api/recycleBin/foxBase/recoverFile/path',
    method: 'post',
    data,
  });
}

// 查询团队文档
export function apiTeamQuery(params) {
	return request({
		url: '/knowledge/api/team/query',
		method: 'get',
		params
	})
}
// 查询团队文件树
export function apiFilesTreeQuery(params) {
  return request({
    url: "knowledge/api/teamFilesTree/query",
    method: "get",
    params
  });
}